//
//  JSMDetailsCell.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMDetailsCell.h"

@implementation JSMDetailsCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView{
    self.mainImageView = [[BaseImageView alloc]init];
    [self.contentView addSubview:self.mainImageView];
    self.mainImageView.layer.borderColor = [[UIColor orangeColor] CGColor];
    
    self.descriptionLabel = [[BaseLabel alloc]init];
    [self.contentView addSubview:self.descriptionLabel];
    self.descriptionLabel.numberOfLines = -1;
    self.descriptionLabel.layer.borderColor = [[UIColor blueColor] CGColor];
    self.descriptionLabel.font = [UIFont systemFontOfSize:16];
    
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    [self.mainImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).with.offset(5);
        make.left.equalTo(self.contentView).with.offset(5);
        make.right.equalTo(self.contentView).with.offset(-5);
        make.height.mas_equalTo(300*ALL_EDITION_HEIGHT);
    }];
    [self.descriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mainImageView.mas_bottom).with.offset(5);
        make.left.equalTo(self.contentView).with.offset(5);
        make.right.equalTo(self.contentView).with.offset(-5);
        make.bottom.equalTo(self.contentView).with.offset(-5);
        
    }];
    
    
    
    
    
    
}


@end
